<script lang="ts" setup>
const props = withDefaults(defineProps<{ modelValue: boolean }>(), {
  modelValue: false
});
const emit = defineEmits(['update:modelValue']);

const changeValue = () => {
  emit('update:modelValue', !props.modelValue);
};
</script>

<template>
  <div class="model-component-container flex items-center">
    <el-button @click="changeValue()">切换</el-button>
    <span class="ml-2">{{ props.modelValue ? '是' : '否' }}</span>
  </div>
</template>

<style lang="scss" scoped></style>
